# -*- coding: utf-8 -*-
#!/usr/bin/env python
#

import cgi
import datetime
import wsgiref.handlers

from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp

from model import *


class MainPage(webapp.RequestHandler):
  def get(self):
    lists = {'xuanhuan':u'玄幻','dushi':u'都市','kehuan':u'科幻','wuxia':u'武侠','xianxia':u'仙侠'}
    #for key in lists:
        #c = Category(enname=key,cnname=lists[key])
        #c.put()
        #print lists[key]
    #for result in Category.all():
    print db.Query(Category).count()
    self.response.out.write('hello world')

application = webapp.WSGIApplication([
  ('/', MainPage)
], debug=True)


def main():
  wsgiref.handlers.CGIHandler().run(application)


if __name__ == '__main__':
  main()
